/*
 * Copyright (c) 2010 Zauber S.A.  -- All rights reserved
 */
package ar.edu.itba.ia2010.geneticos.motor.api.sintaxistree.bitwise;

import ar.edu.itba.ia2010.geneticos.motor.api.sintaxistree.Expresion;
import ar.edu.itba.ia2010.geneticos.motor.api.sintaxistree.impl.AbstractExpresion;

/**
 * Clase base para expresiones binarias.
 * 
 * @author Juan F. Codagnone
 * @since Mar 29, 2010
 */
public abstract class AbstractBinaryExpression extends AbstractExpresion {

    /** @see Expresion#recursiveEvaluation(boolean[]) */
    public final boolean recursiveEvaluation(final boolean... vars) {
        return eval(childs.get(0).recursiveEvaluation(vars),
                    childs.get(1).recursiveEvaluation(vars));
    }
    
    /** @see Expresion#getSubExpresions() */
    public final int getSubExpresions() {
        return 2;
    }
}
